Handle NULL start/end pointers
authorHavoc Pennington <hp@pobox.com>
Sat, 30 Sep 2000 17:08:25 +0000 (17:08 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Sat, 30 Sep 2000 17:08:25 +0000 (17:08 +0000)
commit632fda6f0bd578006226b29badcfb63729f5eba2
tree3326ce59b9514267f898dbd4b1d7cd9f49517c7c
parentf717bda19732f874762f2c48521d8370f15bf3f0
Handle NULL start/end pointers

2000-09-30  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
NULL start/end pointers

* gtk/gtktextbuffer.c: Write some docs
(gtk_text_buffer_get_selection_bounds): Allow start/end to be
NULL, so you can just check whether there's a selection.

* gtk/gtktextbtree.c (gtk_text_btree_remove_mark): No need to
cleanup_line or segments_changed ourselves, it gets done
in unlink_segment

* gtk/gtktextmark.h:
s/gtk_text_mark_deleted/gtk_text_mark_get_deleted/

* gtk/gtktextsegment.h: Clean up some indentation and naming mess

* gtk/gtktextmark.c: delete some more old Tk cruft

* gtk/gtktextbuffer.c (gtk_text_buffer_delete_mark): add ref to
mark before removing it, so we can emit MARK_DELETED with a valid
pointer.
(gtk_text_buffer_mark_set): hold ref across signal emission

* gtk/gtktextbtree.c (gtk_text_btree_remove_mark): improve
whining about attempts to delete special marks

* gtk/gtktextbuffer.c (_gtk_text_buffer_spew): Prepend with
underscore, since it's internal.

* gtk/gtktextbuffer.h: Remove find_string prototype, this is
now implemented in terms of iterators in gtktextiter.h

* gtk/gtktextbuffer.c (gtk_text_buffer_set_text):
New function, destructively sets contents of buffer. Also
a convenient way to clear the buffer by setting text to ""

* gtk/gtktextiter.c (gtk_text_iter_make_surreal): reformat
multiline string literal

* gtk/testtext.c (text_changed_callback): Redraw line numbers if
text changes.

* gtk/gtktextiter.c (forward_char): Return FALSE if new location
is not dereferenceable
(gtk_text_iter_forward_lines): fix return value
17 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextbtree.c
gtk/gtktextbuffer.c
gtk/gtktextbuffer.h
gtk/gtktextiter.c
gtk/gtktextmark.c
gtk/gtktextmark.h
gtk/gtktextsegment.h
gtk/gtktextview.c
gtk/testtext.c
tests/testtext.c